package com.asen.commons.core.base.service;

import com.asen.commons.core.base.domain.BaseData;

/**
 * 基础资料Service接口
 *
 * @author Gary
 * @version 1.0
 * @date 2018-12-09
 */
public interface BaseDataService<T extends BaseData> extends EnableBaseService<T> {

    /**
     * 获取对象
     *
     * @param name
     * @return
     * @throws Exception
     */
    T getByName(String name) throws Exception;

    /**
     * 检查名称是否重复
     *
     * @param id
     * @param name
     * @throws Exception
     */
    void checkDupByName(Long id, String name) throws Exception;
}
